
//自定义标签
Vue.component("top",{
	data(){
		return {
			name :"",
			status : 0,
			uid : "",
			image:""
		};
	},
	
	template:
		`
		<div style="width: 100%" id="section-0">

		<div class="topmenu" id="tophead">

			<div class="wrap">

				<div id="mobilemenu"></div>

				<div class="mask"></div>

				<div class="logo">
					<a href='../demo/index.html'><img src="../images/logo1.png" alt="零号网"
						width="280" height="70"></a>
				</div>

				<div class="menu">

					<ul id="nav">

						<li class="closex"><i class="iconfont icon-guanbi"></i></li>

						<li class="mainlevel"><a class='hover' href="../demo/index.html">网站首页</a></li>



						<li class="mainlevel"><a href='../chat/index.html' target='_blank'>我的消息</a></li>



						<li class="mainlevel"><a href='' target='_blank'>会员中心</a></li>



						<li class="mainlevel"><a href='../user_back/Mycollection/mycollection.html' target='_blank'>我的收藏</a></li>



						<li class="mainlevel"><a href='../user_back/ueditor-dev-1.5.0/createWz.html' target='_blank'>创作中心</a></li>
						<li class="mainlevel">
							<div class="search">
								<i class="iconfont icon-sousuo"></i>
							</div>
						</li>
						<li class="mainlevel"><div>
						<div>
							<div class="layui-btn-container"
										style="float: left; ">
										<button v-show="status==0"  type="button" class="layui-btn"
											onclick="location.href = '../demo/login.html'" >登录</button>
								
									</div>
									<a v-show="status==1">
									<img :src="image" style="float:left;width:45px;height:45px;border-radius:50%;">
									<div style="width: 45px; height: 45px">
										<ul  >
											<li class="dropdown active"><a href="#"
												data-toggle="dropdown" class="dropdown-toggle avatar active"
												aria-expanded="false"></span></a>
												<ul class="dropdown-menu gerenzhongxin in"
													style="margin-top: 40px;">
													<li class="dropdown-menu-header text-center"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
													&nbsp;&nbsp&nbsp;{{name}}</strong></li>
													
													<li class="m_2"><a
														href="../user_back/index.html" target = "_blank"><i
															class="fa fa-envelope-o"></i> 个人中心 <span
															class="label label-success"></span></a></li>
															
													<li class="m_2"><a :href="'../Mp/index.html?id='+this.uid" class="active" target = "_blank"><i
															class="fa fa-wrench"></i> 我的主页</a></li>
													
													<li class="m_2"><a href="../user_back/PersonalCenter/PersonalCenterIndex.html" class="active" target='_blank'><i
															class="fa fa-wrench"></i> 设置</a></li>
											
											
													<li class="m_2 "><a href="../delete.s"><i
															class="fa fa-lock"></i> 退出</a></li>
												</ul></li>
											</a>
										</ul>		
									</div></div>
														
							</div></li>

					</ul>

				</div>

			</div>
		</div>
		
			`,
	created(){
		axios.get("../top.s").then(res=>{
			if(res.data!=null){
				this.status = 1;
				this.name=res.data.name;
				this.uid = res.data.id;
				this.image = res.data.image;
			}
		});
	}
	//
});